<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>请求管理</title>
</head>
<body>
	<!-- BEGIN: load jquery -->
	<script language="javascript" type="text/javascript"
		src=<?php 
		echo '"'.base_url("js/jqplot/jquery.js").'"';
		?>></script>
	<!-- END: load jquery -->
	
	<script type="text/javascript">
$(
	function()
	{
		$(".handle_req").click(
				function ()
				{
					alert("请求已经处理！");
				}
				);
	}
);
</script>

	<style type="text/css">
td {
	width: 230px;
	background-color: #C4E1FF;
	height: 70px;
	font-size: 13pt;
	text-align: center;
}
</style>
	<center>
		<table>
			<?php 

			$CI = &get_instance();

			$url = site_url("request_manage/accept");

			if(!$rows)
			{
				echo "<tr><td>您还没有请求！</td></tr>";
				exit();
			}

			foreach($rows as $record)
			{
				$table_row = "";
				$table_row.="<tr>";

				$user_name = get_name_by_uid($record->reqUid);

				$table_row.="<td>";
				$table_row.=$user_name;
				$table_row.="</td>";

				$table_row.="<td>";
				$reqUid = $record->reqUid;
				$table_row.="<a class=\"handle_req\" href=".$url."/1"."/$reqUid".">接受</a>";
				$table_row.="</td>";

				$table_row.="<td>";
				$table_row.="<a class=\"handle_req\" href=".$url."/0"."/$reqUid".">拒绝</a>";
				$table_row.="</td>";

				$table_row.="</tr>";

				echo $table_row;
			}
			?>
		</table>
	</center>
</body>
</html>
